Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix checks for hardware intrinsics special casing in IL interpreter #38835

Merged

Conversation

yuchong-pan
Copy link
Contributor

In #38673, @BruceForstall indicated that EEClass::GetDebugClassName() in the checks for the get_IsSupported() methods of hardware intrinsics is only available in _DEBUG builds. Hence I changed the checks to obtain the method name, class name, and namespace name from the generally available CEEInfo::getMethodNameeFromMetadata method.

@yuchong-pan yuchong-pan added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI area-VM-coreclr runtime-coreclr specific to the CoreCLR runtime labels Jul 7, 2020
@yuchong-pan yuchong-pan self-assigned this Jul 7, 2020
@BruceForstall BruceForstall removed the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 7, 2020
@yuchong-pan yuchong-pan merged commit 4cb924d into dotnet:master Jul 7, 2020
@yuchong-pan yuchong-pan deleted the yuchong-pan/interp-hw-intrinsics branch July 7, 2020 09:47
#endif // defined(TARGET_X86) || defined(TARGET_AMD64)
#endif // _DEBUG
strcmp(methToCall->GetName(), "get_IsSupported") == 0)
strcmp(methodName, "get_IsSupported") == 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to get nested classes such as: System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.get_IsSupported?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise, given that DoGetIsSupported() just returns false, is there any reason why we aren't just special casing all of these get_IsSupported functions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to get nested classes such as: System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.get_IsSupported?

I think these might need to be strncmps to handle all those cases correctly and just check the first 29 chars.

is there any reason why we aren't just special casing all of these get_IsSupported functions?

Could you expand what you mean by "special casing" here? I think this is intended to be a temporary solution until a more production quality approach can be designed. See this comment for context on what kinds of cases need to be covered by a more robust solution.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just indicating that they were being handled here to explicitly return false.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha! Yeah, the intention was to special case all the HW intrinsics' get_IsSupported methods to return false until the interpreter has a more robust solution.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-VM-coreclr runtime-coreclr specific to the CoreCLR runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants